<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>博客分类</title>
    <link th:href="@{//lib/wangEditor-3.1.1/release/wangEditor.min.css}"></link>
    <link th:href="@{/lib/wangEditor-3.1.1/release/wangEditor-fullscreen-plugin.css}"></link>
    <th:block th:replace="headfoot/head::head_common"></th:block>
</head>

<body>
<div class="container-fluid kj-form-container">
    <form
            id="form" class="form-horizontal validate kj-form-container-content" role="form"
            method="post" action="/blog/category/save">
        <input type="hidden" id="id" name="id" th:value="${entity?.id}"/>

        <div class="from-group row has-feedback kj-form-title-button-bar">
            <div class="col-md-7">
                <button type="button" class="btn btn-default btn-sm action-ajax-form kj-btn-save">
                    <i class="iconfont icon-baocun"></i>&ensp;保存
                </button>
                <button type="button" class="btn btn-default btn-sm action-close-tab kj-btn-cancel">
                    <i class="iconfont icon-guanbi"></i>&ensp;取消
                </button>
            </div>
            <div class="col-md-5">
                </label> <label class="control-label kj-form-title-button-bar-label">创建时间：
                <span th:text="${entity?.createTime != null ? #dates.format(entity?.createTime, 'yyyy-MM-dd HH:mm:ss') : #dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}"></span>
            </label>
            </div>

        </div>

        <div class="card kj-form-container-card">
            <div class="card-header kj-form-container-card-header">
                <h4>
                    <strong>分类信息</strong>
                </h4>
            </div>
            <div class="card-body kj-form-container-card-body">

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">分类名称</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="name"
                               type="text"
                               data-rule-required="true" data-rule-maxlength="20"
                               data-rule-repeat="/blog/category/check"
                               data-msg-repeat="名称重复"
                               autocomplete="off"
                               placeholder="分类名称"
                               th:value="${entity?.name}"/>
                    </div>
                    <label class="col-md-2 control-label kj-form-container-content-label">状态</label>
                    <div class="col-md-3 validateDiv">
                        <select id="enabled"
                                class="form-control input-sm kj-form-container-content-select"
                                name="enable"
                                th:data-value="${entity?.enable}">
                            <option value="">--请选择--</option>
                            <option value="false">禁用</option>
                            <option value="true">启用</option>

                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">排序</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="sort"
                               type="text"
                               data-rule-required="true" data-rule-maxlength="4"
                               data-rule-digits="true"
                               autocomplete="off"
                               placeholder="排序"
                               th:value="${entity?.sort}"/>
                    </div>
                    <label class="col-md-2 control-label kj-form-container-content-label">点击次数</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="clickNum"
                               type="text"
                               data-rule-required="true" data-rule-maxlength="10"
                               data-rule-digits="true"
                               autocomplete="off"
                               placeholder="点击次数"
                               th:value="${entity?.clickNum}"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">分类介绍</label>
                    <div class="col-md-8 validateDiv">
                        <textarea class="form-control wangEditor-textarea" rows="3" id="introduce" name="introduce"
                                  th:text="${entity?.introduce}" data-rule-required="true"
                                  placeholder="请输入分类介绍" autocomplete="off"></textarea>
                    </div>
                </div>

            </div>
        </div>
    </form>
</div>
<script th:src="@{/lib/wangEditor-3.1.1/release/wangEditor.min.js}"></script>
<script th:src="@{/lib/wangEditor-3.1.1/release/wangEditor-fullscreen-plugin.js}"></script>
<th:block th:replace="headfoot/foot::form_ztree_foot"></th:block>

</body>
</html>